import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询请假记录列表
export function listLeaverecord(query) {
  return request({
    url: '/sl/leaverecord/list',
    method: 'get',
    params: query
  })
}

// 查询请假记录详细
export function getLeaverecord(leaveRecordId) {
  return request({
    url: '/sl/leaverecord/' + parseStrEmpty(leaveRecordId),
    method: 'get'
  })
}

// 新增请假记录
export function addLeaverecord(data) {
  return request({
    url: '/sl/leaverecord',
    method: 'post',
    data: data
  })
}

// 修改请假记录
export function updateLeaverecord(data) {
  return request({
    url: '/sl/leaverecord',
    method: 'put',
    data: data
  })
}

// 删除请假记录
export function delLeaverecord(leaveRecordId) {
  return request({
    url: '/sl/leaverecord/' + leaveRecordId,
    method: 'delete'
  })
}
